cmake_minimum_required(VERSION 3.0.2)
project(mv_driver)

## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  cv_bridge
  image_transport
  roscpp
  sensor_msgs
  nodelet
)

find_package(OpenCV REQUIRED)

catkin_package(
 INCLUDE_DIRS include
 CATKIN_DEPENDS cv_bridge image_transport roscpp sensor_msgs nodelet
 DEPENDS system_lib
)

include_directories(include ${catkin_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS})

add_library(mv_driver src/mv_driver.cpp)
target_link_libraries(mv_driver
  ${catkin_LIBRARIES}
  ${OpenCV_LIBRARIES} 
  ${PROJECT_SOURCE_DIR}/lib/libMVGev.so
)

add_executable(mv_driver_node src/mv_driver_node.cpp)
target_link_libraries(mv_driver_node
  ${catkin_LIBRARIES}
  mv_driver
)

add_library(mv_driver_nodelet src/mv_driver_nodelet.cpp)
target_link_libraries(mv_driver_nodelet
  ${catkin_LIBRARIES}
  mv_driver
)

